<template>
	<div class="userSetting">
		<!-- 头部 -->
		<div class="nav_top d-flex jc-between ai-center bg-white">
			<div> 
				<el-button type="text" @click="$router.push('/user')">
					<div class="iconfont icon-back ml-1 fs-xxxl text-dark"></div>
				</el-button>
			</div>
			<div class="fs-xxl text-dark pr-3">
				设置
			</div>
			<div></div>
		</div>
		<!-- 用户信息 -->
        <div class="bg-white my-3 py-3 px-2">
        	<router-link to="/user/userSetting" tag="div" class="d-flex jc-between ai-center border-bottom">
        		<div>账户管理</div>
        		<div class="d-flex ai-center">
        			
        			<div class="iconfont icon-right text-grey"></div>
        		</div>
        	</router-link>
        </div>

        <div class="bg-white my-3 py-2 px-2">
        	<div @click="clear" class="d-flex jc-between ai-center py-3 border-bottom">
        		<div>清除缓存</div>
        		<div class="d-flex ai-center">
        		
        		</div>
        	</div>
        	<div class="d-flex jc-between ai-center py-3 border-bottom">
        		<div>当前版本</div>
        		<div class="d-flex ai-center">
        			v1.00
        		</div>
        	</div>
            <div @click="alert" class="d-flex jc-between ai-center py-2">
                <div>产品简介</div>
                <div class="d-flex ai-center">
                    
                    <div class="iconfont icon-right text-grey"></div>
                </div>
            </div>
        </div>

        
        <!-- 退出登录 -->
        <div class="bg-white my-3 px-2">
             <el-button type="text" @click="exit">退出登录</el-button>
        </div>
	</div>
</template>

<script>
import {Toast, MessageBox} from 'mint-ui';
	export default {
		data() {
			return {
				user: {}

			}
		},
    components: {
      
    },
		methods: {
      exit(){
           localStorage.clear();
           this.$router.push('/loginHome')
       },
     
           clear(){
              Toast("清除成功");
           },
           alert(){
            Toast("未开发");
           }

		},
    created(){
      this.user = this.user = this.$store.getters.userInfo;
    },
		mounted() {   //在页面创建之前设置body的背景色
			document.querySelector('body').setAttribute('style', 'background:#f1f3f4')
		}, 
        beforeDestroy() {   //在页面销毁之前移除body的属性，目的是设置的颜色只对当前页面有效
        	document.querySelector('body').removeAttribute('style')
        },
	}
</script>

<style lang="scss" scoped>
	.el-button {
		width: 100%;
		color: #e84140;
	}

</style>